/*
 * @Author: suk.bear suk.bear.suwu@gmail.com
 * @Date: 2024-01-18 14:12:34
 * @LastEditors: 杨帆
 * @LastEditTime: 2024-03-22 14:24:47
 * @FilePath: /dcy-web/packages/utils/excel.ts
 * @Description: excel解析工具
 */
export { transformExcelToLucky } from './transformExcelToLucky'

export interface TableData {
  sheetName?: string
  columns?: string[]
  data?: [] | any
  [property: string]: any
}

export { parseExcel } from '@x-dev-tools/utils'

export function processTableData(columns: string[], data: any) {
  return data.map((item: any) => {
    return columns.map(column => item[column] !== undefined ? item[column] : null)
  })
}
